package com.ternnetwork.batch.mapper.demo;


import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;

import com.ternnetwork.batch.item.mapper.excel.ModelToExcelRowMapper;
import com.ternnetwork.batch.model.demo.CreditBill;

public class CreditBillToExcelRowMapper implements ModelToExcelRowMapper<Row> {

	
	public Row mapRow(Object t,Sheet sheet,Workbook workbook,Integer rowIndex) throws Exception {
		
		 Row  row=sheet.createRow(rowIndex);
		
		 CreditBill creditBill=(CreditBill)t;
		 
		 row.createCell(0).setCellValue(creditBill.getAccountId());
		 row.createCell(1).setCellValue(creditBill.getAddress());
		 row.createCell(2).setCellValue(creditBill.getMobilePhoneNo());
		 
		return row;
	}

}
